.TH "PAPI_stop_counters" 3 "Tue Jan 15 2013" "Version 5.1.0.2" "PAPI" \" -*- nroff -*-
.ad l
.nh
.SH NAME
PAPI_stop_counters \- 
.PP
Stop counting hardware events and reset values to zero.  

.SH SYNOPSIS
.br
.PP
.SH "Detailed Description"
.PP 
\fBC Interface:\fP
.RS 4
#include <\fBpapi.h\fP> 
.br
 int PAPI_stop_counters( long long *values, int array_len );
.RE
.PP
\fBParameters:\fP
.RS 4
\fI*values\fP an array where to put the counter values 
.br
\fIarray_len\fP the number of items in the *values array
.RE
.PP
\fBPostcondition:\fP
.RS 4
After this function is called, the values are reset to zero.
.RE
.PP
\fBReturn values:\fP
.RS 4
\fIPAPI_EINVAL\fP One or more of the arguments is invalid. 
.br
\fIPAPI_ENOTRUN\fP The EventSet is not started yet. 
.br
\fIPAPI_ENOEVST\fP The EventSet has not been added yet.
.RE
.PP
The PAPI_stop_counters() function stops the counters and copies the counts into the *values array. The counters must have been started by a previous call to PAPI_start_counters().
.PP
.PP
.nf
int Events[2] = { PAPI_TOT_CYC, PAPI_TOT_INS };
long long values[2];
if ( PAPI_start_counters( Events, 2 ) != PAPI_OK )
    handle_error(1);
your_slow_code();
if ( PAPI_stop_counters( values, 2 ) != PAPI_OK )
    handle_error(1);
.fi
.PP
.PP
\fBSee also:\fP
.RS 4
PAPI_read_counters() PAPI_start_counters() PAPI_set_opt() 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for PAPI from the source code.
